import 'dart:typed_data';

import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'xf_evaluate_method_channel.dart';

abstract class XfEvaluatePlatform extends PlatformInterface {
  /// Constructs a XfEvaluatePlatform.
  XfEvaluatePlatform() : super(token: _token);

  static final Object _token = Object();

  static XfEvaluatePlatform _instance = MethodChannelXfEvaluate();

  /// The default instance of [XfEvaluatePlatform] to use.
  ///
  /// Defaults to [MethodChannelXfEvaluate].
  static XfEvaluatePlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [XfEvaluatePlatform] when
  /// they register themselves.
  static set instance(XfEvaluatePlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<void> setVadListener() {
    throw UnimplementedError('setVadListener() has not been implemented.');
  }

  Future<void> destroyVadListener() {
    throw UnimplementedError('destroyVadListener() has not been implemented.');
  }

  Future<void> detectVad(Uint8List frame, int len) {
    throw UnimplementedError('detect() has not been implemented.');
  }

  Future<void> resetVad() {
    throw UnimplementedError('reset() has not been implemented.');
  }

  void setChannelListener(Function(String method, dynamic) callback);

  Future<void> asyncVadConfig(String status_bos_timeout, String status_finish);
}
